﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace loginWinForm.common
{
    class ResultBox
    {
        public static void ok(string msg,string title)
        {
            MessageBox.Show(msg, title);
        }
        public static void ok(string msg)
        {
            MessageBox.Show(msg, "提示");
        }

        public static void ok()
        {
            MessageBox.Show("操作成功","提示");
        }
     
        public static void fail()
        {
            MessageBox.Show("操作失败","提示");
        }
        public static void fail(string msg, string title)
        {
            MessageBox.Show(msg, title);
        }
        public static void fail(string msg,string title, MessageBoxButtons buttons, MessageBoxIcon icon)
        {
            MessageBox.Show(msg, title, buttons, icon);
        }

        public static void error(string msg, string title)
        {
            MessageBox.Show(msg, title, MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
        }
        public static void error(string msg)
        {
            MessageBox.Show(msg, "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
        }

        public static void warning(string msg)
        {
            MessageBox.Show(msg, "提示");
        }
        public static void warning(string msg, string title)
        {
            MessageBox.Show(msg, title, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
        }

    }
}
